// DEFINES
#define SERVER	"127.0.0.1"	// localhost ip addr
#define HOME_PLUS_PORT	2400	// home plus is opened 24 hours, 7days a week
#define UA	"127.0.0.1"
#define UA_PORT	2401
#define MAX_BUF	1024

// user agent states
#define ON	1	// log on
#define OFF	0	// log off

// CMD Define

// struct define
typedef struct MSG_STRUCT{
	int cmd;
	char msg[MAX_BUF] ;
}MSG;

typedef struct USER_AGENT_INFO{
	int port;
	char addr[16];
	int state;
}UA_INFO;

// 7segment
#define BAUDRATE B57600
#define MODEMDEVICE "/dev/ttyUSB0"
#define _POSIX_SOURCE 1 /* POSIX compliant source */
#define FALSE 0
#define TRUE 1

// sensor
volatile int STOP=FALSE;

// dotmatrix
#define LIGHT_ON_1	1
#define LIGHT_OFF_1	2
#define LIGHT_ON_2	3
#define LIGHT_OFF_2	4
#define LIGHT_ON_3	5
#define LIGHT_OFF_3	6
#define CURTAIN_OPEN	7
#define CURTAIN_CLOSE	8
#define HEATING_ON	9
#define HEATING_OFF	10
#define SECURITY_ON	11
#define SECURITY_OFF	12
#define VISITOR_REPORTING_ON	13
#define VISITOR_REPORTING_OFF	14
#define DOOR_LOCK	15
#define DOOR_UNLOCK	16
#define WAKE_UP	17
#define OUT	18
#define COME_BACK_HOME	19
#define SLEEP	20
#define EMERGENCY	21
